package com.haredot.holder;

import com.haredot.entity.Logger;

/**
 * 日志上下文持有者
 */
public class LogContextHolder {

    private static final ThreadLocal<Logger> threadLocal = ThreadLocal.withInitial(Logger::new) ;

    public static Logger getLog() {
        return threadLocal.get();
    }

    public static void clearLog() {
        threadLocal.remove();
    }
}
